import { defineStore } from "pinia";
import { ILayout, Mode, Theme } from "@/type/Layout";
export const useLayoutStore = defineStore({
  id: "layout",
  state: (): ILayout => ({
    menuMode: "inline",
    sibarLogo: true,
    isOpenSingle: false,
    themeType: "default",
  }),
  getters: {
    getMenuMode: (state) => {
      return state.menuMode;
    },
  },
  actions: {
    setMenuMode(mode: Mode) {
      this.menuMode = mode;
    },
    setSibarLogo(logo: Boolean) {
      this.sibarLogo = logo;
    },
    setIsOpenSingle(open: Boolean) {
      this.isOpenSingle = open;
    },
    setThemeType(theme: Theme) {
      this.themeType = theme;
    },
  },
});
